package com.fire.control.system.entity;

import java.io.Serializable;
import java.util.Date;
import java.util.UUID;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.MappedSuperclass;

/***
 * 
 * @ClassName:  BaseEntity   
 * @Description:基础类实体，包含了一些通用的属性,其他实体应该继承他.
 * @author:   chenchuang
 * @date:   2017年5月6日 下午2:49:34   
 *
 */
@MappedSuperclass
public  class BaseEntity implements Serializable{
	
	private static final long serialVersionUID = 1L;
	
	@Id
	@Column(name="id",length=36)
	private String id = UUID.randomUUID().toString().replace("-", "");
	
	@Column(name = "status", nullable = false)
	private Boolean status = true;//数据是否可用
	
	@Column(name = "create_time", nullable = false)
	private Date createTime = new Date();
	
	@Column(name = "update_time", nullable = false)
	private Date updateTime;
	
	public Date getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}



	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public Boolean getStatus() {
		return status;
	}

	public void setStatus(Boolean status) {
		this.status = status;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	
	
}
